home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / ENROLS1.PAK / SECTSET.CPP < prev    next >
C/C++ Source or Header  |  1997-05-06  |  2KB  |  73 lines

  1. // SectSet.cpp : implementation of the CSectionSet class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "Enroll.h"
  6. #include "SectSet.h"
  7.  
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CSectionSet implementation
  16.  
  17. IMPLEMENT_DYNAMIC(CSectionSet, CRecordset)
  18.  
  19. CSectionSet::CSectionSet(CDatabase* pdb)
  20.     : CRecordset(pdb)
  21. {
  22.     //{{AFX_FIELD_INIT(CSectionSet)
  23.     m_CourseID = _T("");
  24.     m_SectionNo = _T("");
  25.     m_InstructorID = _T("");
  26.     m_RoomNo = _T("");
  27.     m_Schedule = _T("");
  28.     m_Capacity = 0;
  29.     m_nFields = 6;
  30.     //}}AFX_FIELD_INIT
  31.     m_nDefaultType = snapshot;
  32.  
  33. }
  34.  
  35. CString CSectionSet::GetDefaultConnect()
  36. {
  37.     return _T("ODBC;DSN=Student Registration");
  38. }
  39.  
  40. CString CSectionSet::GetDefaultSQL()
  41. {
  42.     return _T("[Section]");
  43. }
  44.  
  45. void CSectionSet::DoFieldExchange(CFieldExchange* pFX)
  46. {
  47.     //{{AFX_FIELD_MAP(CSectionSet)
  48.     pFX->SetFieldType(CFieldExchange::outputColumn);
  49.     RFX_Text(pFX, _T("[CourseID]"), m_CourseID);
  50.     RFX_Text(pFX, _T("[SectionNo]"), m_SectionNo);
  51.     RFX_Text(pFX, _T("[InstructorID]"), m_InstructorID);
  52.     RFX_Text(pFX, _T("[RoomNo]"), m_RoomNo);
  53.     RFX_Text(pFX, _T("[Schedule]"), m_Schedule);
  54.     RFX_Int(pFX, _T("[Capacity]"), m_Capacity);
  55.     //}}AFX_FIELD_MAP
  56.  
  57. }
  58.  
  59. /////////////////////////////////////////////////////////////////////////////
  60. // CSectionSet diagnostics
  61.  
  62. #ifdef _DEBUG
  63. void CSectionSet::AssertValid() const
  64. {
  65.     CRecordset::AssertValid();
  66. }
  67.  
  68. void CSectionSet::Dump(CDumpContext& dc) const
  69. {
  70.     CRecordset::Dump(dc);
  71. }
  72. #endif //_DEBUG
  73.